package com.idreamsky.core.lib.http;

import java.io.InputStream;

public interface IRequestListener {
    /**
     * Called when a request completes with the given response.
     *
     * Executed by a background thread: do not update the UI in this method.
     */
    public void onComplete(InputStream is, int length, String url);

    /**
     * Called when a request has a network or request error.
     *
     * Executed by a background thread: do not update the UI in this method.
     */
    public void onFailed(String error, String url);

}
